import QtQuick 2.15
import QtQuick.Controls 2.15


ToolButton {
	property string source: ''
	property string toolTip: ''
	property bool isChecked: false
	property bool isCheckable: false
	
	id: self
	icon.source: source
	background: Rectangle {
		color: self.down || (isCheckable && self.checked) ? Qt.color('#EEEEEE') : Qt.color('#00000000')
	}
	icon.color: self.down || (isCheckable && self.checked) ? Qt.color('#00000000') : Qt.color('#EEEEEE')
	checkable: isCheckable
	checked: isChecked
	ToolTip.visible: hovered
	ToolTip.text: toolTip
}
